<template>
    <van-cell class="comment-item">
      <van-image class="avatar" fit="cover" slot="icon" round :src="comment.aut_photo"/>
      <div slot="title">
        <div>
          <div class="name">{{comment.aut_name}}</div>
            <div class="like-wrap">
              <van-icon class="like-icon" name="good-job-o"/>
              <span class="like-count">{{ comment.like_count }}</span>
            </div>
          <div class="title-wrap">
            <div class="content">{{comment.content}}</div>
            <div>
              <span class="pubdate">{{comment.pubdate|datatime('MM:DD HH:mm')}}</span>
              <van-button round size="mini" class="reply-btn">回复</van-button>
            </div>
          </div>
        </div>
      </div>
    </van-cell>
</template>

<script>
export default {
  name: "comentItem",
  props:{
    comment:{
      type:Object,
      required:true
    }
  }
}
</script>

<style scoped lang="less">
.comment-item{
  .avatar{
    width: 36px;
    height: 36px;
    margin-right: 13px;
  }
  .name{
    font-size: 14px;
    color: #406599;
  }
  .content{
    font-size:16px;
    color: #222222;
  }
  .pubdate{
    font-size: 10px;
    margin-right: 10px;
  }
  .title-wrap{
    display: flex;
    justify-content: space-between;
  }
  .like-wrap{
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
</style>